using System;
using NUnit.Framework;
using ValidationFramework.Extensions;

namespace ValidationFramework.Tests.Extensions
{
    public sealed class StringExtensionTest
    {
        [TestFixture]
        public sealed class ToCamelTokenized
        {

            [Test]
            public void Test1()
            {
                var tokenizedMemberName = "FirstNameProperty".ToCamelTokenized();
                Assert.AreEqual("First Name Property", tokenizedMemberName);
            }
            [Test]
            public void Test2()
            {
                var tokenizedMemberName = "ABC".ToCamelTokenized();
                Assert.AreEqual("A B C", tokenizedMemberName);
            }
            [Test]
            public void Test3()
            {
                var tokenizedMemberName = "aBC".ToCamelTokenized();
                Assert.AreEqual("a B C", tokenizedMemberName);
            }
            [Test]
            public void Test4()
            {
                var tokenizedMemberName = "abc".ToCamelTokenized();
                Assert.AreEqual("abc", tokenizedMemberName);
            }

            [Test]
            public void JustSpaces()
            {
                var tokenizedMemberName = " ".ToCamelTokenized();
                Assert.AreEqual(" ", tokenizedMemberName);
            }

            [Test]
            public void EmptyString()
            {
                var tokenizedMemberName = "".ToCamelTokenized();
                Assert.AreEqual("", tokenizedMemberName);
            }

            [Test]
            [ExpectedException(typeof(ArgumentNullException))]
            public void ExceptionNullValue()
            {
                const string nullString = null;
                nullString.ToCamelTokenized();
            }
        }

    }
}